// 贵港旅游攻略详情测试数据
export const guideDetailData = [
  {
    id: 1,
    title: "贵港三日游完美攻略",
    type: "official",
    views: 12580,
    likes: 2360,
    comments: 326,
    date: "2024-03-20",
    isFavorited: false,
    cover: "https://img0.baidu.com/it/u=1995709151,1000347016&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500",
    description:
      "本攻略为您精心规划贵港三日游行程，包含景点推荐、美食指南、交通建议等详细信息，让您的贵港之旅轻松愉快。",
    author: {
      id: 1,
      name: "贵港文旅",
      avatar: "https://tse2-mm.cn.bing.net/th/id/OIP-C.MQelU37BC137KxfldtzvKQHaIp?w=162&h=184&c=7&r=0&o=5&pid=1.7",
      description: "贵港市文化和旅游局官方账号",
    },
    itinerary: [
      {
        title: "贵港文化探索之旅",
        spots: [
          {
            name: "贵港博物馆",
            time: "09:00-11:00",
            description: "了解贵港历史文化，参观珍贵文物展览。",
            images: [
              "https://img1.baidu.com/it/u=2689790312,1143352549&fm=253&fmt=auto&app=138&f=JPEG?w=1376&h=500", 
              "https://tse1-mm.cn.bing.net/th/id/OIP-C.KKOjP2JAUVphGvxG1tyACwHaEt?w=259&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3"
            ],
            tips: "建议在开馆时间到达，避开人流高峰。",
            transportation: "可乘坐2路公交车到达。",
          },
          {
            name: "贵港美食街",
            time: "11:30-13:30",
            description: "品尝地道贵港美食，体验本地饮食文化。",
            images: [
              "https://img0.baidu.com/it/u=2330699682,103157205&fm=253&fmt=auto&app=120&f=JPEG?w=1202&h=800", 
              "https://tse2-mm.cn.bing.net/th/id/OIP-C.jwA5fl75UO7aI2cJcxlxSgHaEM?w=311&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3"
            ],
            tips: "推荐尝试螺蛳粉和艇仔粥。",
            transportation: "步行10分钟可到达。",
          },
        ],
      },
      {
        title: "自然风光体验之旅",
        spots: [
          {
            name: "江滨公园",
            time: "09:00-11:00",
            description: "欣赏浔江美景，感受贵港城市风光。",
            images: [
              "https://img0.baidu.com/it/u=1995709151,1000347016&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500", 
              "https://tse2-mm.cn.bing.net/th/id/OIP-C.zJkT8om3SWZ8cTGOqPdFZQHaEp?w=264&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3"
            ],
            tips: "早晨和黄昏是拍照的最佳时间。",
            transportation: "市中心可步行到达，也可乘坐1路公交车。",
          },
          {
            name: "观音山风景区",
            time: "13:00-16:00",
            description: "登高望远，俯瞰贵港全景，欣赏壮丽山色。",
            images: [
              "https://tse3-mm.cn.bing.net/th/id/OIP-C.reMiOzV4T6_vix1_hGXF_wHaFh?w=223&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3", 
              "https://tse2-mm.cn.bing.net/th/id/OIP-C.wafNYhYML1-g6cbry9IjcAHaFj?w=244&h=184&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3"
            ],
            tips: "爬山请带好登山鞋，注意防晒。",
            transportation: "可乘坐5路公交车到达山脚下。",
          },
        ],
      },
      {
        title: "贵港历史文化探索",
        spots: [
          {
            name: "贵港古城墙",
            time: "09:00-11:00",
            description: "见证贵港悠久历史的古城墙，保存完好，历史价值高。",
            images: [
              "https://tse3-mm.cn.bing.net/th/id/OIP-C.DlZqa1bDvWwX9V9ZiFzy8AHaEL?w=286&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3", 
              "https://tse1-mm.cn.bing.net/th/id/OIP-C.hTNPXqT_SvjyXTSF-e7uawHaE_?w=304&h=187&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3"
            ],
            tips: "沿城墙漫步，可以感受贵港的历史变迁。",
            transportation: "市中心步行可达，也可乘坐3路公交车。",
          },
          {
            name: "传统工艺博览中心",
            time: "13:30-15:30",
            description: "展示贵港传统手工艺品，可以参与互动体验。",
            images: [
              "https://img1.baidu.com/it/u=1661261107,1547425867&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=750", 
              "https://tse3-mm.cn.bing.net/th/id/OIP-C.KcnnKK6Zav8KdBuF4qgDrwHaE8?w=296&h=197&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3"
            ],
            tips: "现场有工艺品出售，是购买纪念品的好地方。",
            transportation: "可乘坐4路公交车到达。",
          },
        ],
      },
    ],
    foods: [
      {
        id: 1,
        name: "贵港螺蛳粉",
        description: "正宗贵港特色小吃，汤料浓郁，配料丰富。",
        image: "https://img1.baidu.com/it/u=694461414,142604752&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=882",
        location: "贵港美食街28号",
        price: 15,
      },
      {
        id: 2,
        name: "艇仔粥",
        description: "贵港传统美食，选用新鲜河鲜熬制，口感鲜美。",
        image: "https://tse1-mm.cn.bing.net/th/id/OIP-C.gHCzfZB_w2YoBlwkhK9M6wHaHa?w=218&h=218&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3",
        location: "港北区粤江路45号",
        price: 20,
      },
      {
        id: 3,
        name: "荷叶粉",
        description: "贵港特色小吃，采用新鲜荷叶包裹，清香可口。",
        image: "https://t15.baidu.com/it/u=1009955054,2854934985&fm=224&app=112&f=JPEG?w=292&h=500",
        location: "港南区文化路88号",
        price: 12,
      },
      {
        id: 4,
        name: "酿豆腐",
        description: "选用上等豆腐，搭配新鲜肉馅，口感细腻，香味四溢。",
        image: "https://tse4-mm.cn.bing.net/th/id/OIP-C.-8V-U8Tb3ctIXA61VbIjvwHaFj?w=283&h=214&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3",
        location: "覃塘区中心广场附近",
        price: 18,
      },
    ],
    notes: [
      {
        title: "天气提醒",
        content: "贵港夏季炎热多雨，建议随身携带遮阳伞，注意防晒和防雨。",
      },
      {
        title: "交通建议",
        content: "景点之间可以乘坐公交车或打车，建议提前规划路线，避开早晚高峰。",
      },
      {
        title: "饮食安全",
        content: "品尝街边小吃时，注意选择干净卫生的店铺，避免食物中毒。",
      },
      {
        title: "出行准备",
        content: "准备舒适的鞋子和衣物，携带足够的水和必要的药品。",
      },
    ],
    relatedSpots: [
      {
        id: 1,
        name: "贵港江滨公园",
        image: "https://img0.baidu.com/it/u=1995709151,1000347016&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500",
        price: 0,
        rating: 4.8,
      },
      {
        id: 2,
        name: "观音山公园",
        image: "https://tse3-mm.cn.bing.net/th/id/OIP-C.reMiOzV4T6_vix1_hGXF_wHaFh?w=223&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3",
        price: 15,
        rating: 4.6,
      },
      {
        id: 3,
        name: "贵港博物馆",
        image: "https://img1.baidu.com/it/u=2689790312,1143352549&fm=253&fmt=auto&app=138&f=JPEG?w=1376&h=500",
        price: 0,
        rating: 4.7,
      },
    ],
    recommendedGuides: [
      {
        id: 2,
        title: "贵港美食一日游",
        cover: "https://img0.baidu.com/it/u=2330699682,103157205&fm=253&fmt=auto&app=120&f=JPEG?w=1202&h=800",
        views: 8560,
        likes: 1280,
      },
      {
        id: 3,
        title: "贵港历史文化探索",
        cover: "https://tse3-mm.cn.bing.net/th/id/OIP-C.DlZqa1bDvWwX9V9ZiFzy8AHaEL?w=286&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3",
        views: 7490,
        likes: 980,
      },
      {
        id: 4,
        title: "贵港亲子游攻略",
        cover: "https://tse4-mm.cn.bing.net/th/id/OIP-C.ZJudhdHIW2pLAiK6aMHJ_wHaEK?w=287&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3",
        views: 6720,
        likes: 850,
      },
    ],
    comments: [
      {
        id: 1,
        user: {
          name: "旅行者小王",
          avatar: "https://picsum.photos/id/237/200/200",
        },
        content: "攻略很详细，对我的行程帮助很大！特别是美食推荐部分，我吃到了正宗的贵港特色小吃。",
        time: "2024-03-21 10:30:00",
        replies: [
          {
            id: 1,
            user: {
              name: "贵港文旅",
              avatar: "https://tse2-mm.cn.bing.net/th/id/OIP-C.MQelU37BC137KxfldtzvKQHaIp?w=162&h=184&c=7&r=0&o=5&pid=1.7",
            },
            content: "感谢支持，祝您旅途愉快！有任何其他问题，随时咨询我们。",
            time: "2024-03-21 11:00:00",
          },
        ],
      },
      {
        id: 2,
        user: {
          name: "摄影爱好者",
          avatar: "https://picsum.photos/id/1005/200/200",
        },
        content: "观音山的风景确实壮观，按照攻略上的建议，在黄昏时分拍到了很美的照片。推荐大家尝试！",
        time: "2024-03-22 15:45:00",
        replies: [],
      },
      {
        id: 3,
        user: {
          name: "美食探险家",
          avatar: "https://picsum.photos/id/1012/200/200",
        },
        content: "艇仔粥真的很好吃！和攻略上推荐的一样，鲜美可口，价格也实惠。",
        time: "2024-03-24 09:20:00",
        replies: [
          {
            id: 2,
            user: {
              name: "贵港文旅",
              avatar: "https://tse2-mm.cn.bing.net/th/id/OIP-C.MQelU37BC137KxfldtzvKQHaIp?w=162&h=184&c=7&r=0&o=5&pid=1.7",
            },
            content: "谢谢您的反馈！贵港的美食还有很多，希望您下次再来时能品尝更多特色菜品。",
            time: "2024-03-24 10:05:00",
          },
          {
            id: 3,
            user: {
              name: "本地吃货",
              avatar: "https://picsum.photos/id/1025/200/200",
            },
            content: "建议下次可以试试荷叶粉，也是贵港的特色美食，非常美味！",
            time: "2024-03-24 14:30:00",
          },
        ],
      },
    ],
  },
  {
    id: 2,
    title: "贵港平南石龙景区一日游",
    type: "official",
    views: 8756,
    likes: 1542,
    comments: 235,
    date: "2024-04-15",
    isFavorited: false,
    cover: "https://tse1-mm.cn.bing.net/th/id/OIP-C.RJAceZs9SUKRUuK3VqbUUwHaET?w=259&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3",
    description:
      "平南石龙景区是国家4A级景区，以其奇特的喀斯特地貌而闻名，这里有世界最大的岩溶石林群，还有绝美的水上石林景观。本攻略为您详细介绍一日游路线和注意事项。",
    author: {
      id: 2,
      name: "旅游达人",
      avatar: "https://tse1-mm.cn.bing.net/th/id/OIP-C.KVXcgGvIjZ9LYzKuQeOdnwHaEP?w=293&h=180&c=7&r=0&o=5&pid=1.7",
      description: "资深旅游达人，走遍广西各大景点",
    },
    itinerary: [
      {
        title: "平南石龙景区探索",
        spots: [
          {
            name: "石龙景区大门",
            time: "09:00-09:30",
            description: "在景区大门购票并了解景区概况。",
            images: [
              "https://tse2-mm.cn.bing.net/th/id/OIP-C.wnHew6qbTuDFblJm_u1hrAHaE1?w=259&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3", 
              "https://tse3-mm.cn.bing.net/th/id/OIP-C.LQZvHbgZ2hJYWZyfSCJhcgHaDJ?w=330&h=148&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3"
            ],
            tips: "建议提前在网上购票，可享受优惠。",
            transportation: "可从贵港市区搭乘直达平南的班车，约1小时车程。",
          },
          {
            name: "石林观光区",
            time: "09:30-11:30",
            description: "欣赏奇特的喀斯特地貌和石林景观。",
            images: [
              "https://tse1-mm.cn.bing.net/th/id/OIP-C.XMr8FLgwfDA5_hk2aensjwHaDF?w=267&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3", 
              "https://tse2-mm.cn.bing.net/th/id/OIP-C.OTaNiVnif0-LV1fOTJEwowHaDw?w=318&h=177&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3"
            ],
            tips: "石林区域地形复杂，请跟随指示牌行走。",
            transportation: "景区内有观光车，可购买通票。",
          },
          {
            name: "水上石林",
            time: "13:00-15:00",
            description: "乘坐游船穿行于水上石林之间，感受不同视角的石林美景。",
            images: [
              "https://tse1-mm.cn.bing.net/th/id/OIP-C.6S1aiKQE7g4de7bYnLX2rgHaE7?w=262&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3", 
              "https://tse2-mm.cn.bing.net/th/id/OIP-C.iojXdPe_NYLjQy3szaYlbAHaD8?w=334&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3"
            ],
            tips: "游船项目需另购票，注意安全并穿戴救生衣。",
            transportation: "石林观光区步行可达水上石林码头。",
          },
        ],
      }
    ],
    foods: [
      {
        id: 1,
        name: "平南狗肉",
        description: "平南县的特色美食，选用当地土狗制作，肉质鲜美。",
        image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.4AfMGn9fQk0riHP9fV4UswHaHa?w=218&h=218&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3",
        location: "平南县城多家餐馆",
        price: 45,
      },
      {
        id: 2,
        name: "平南扣肉",
        description: "传统名菜，肥而不腻，香气四溢，是平南的招牌菜肴。",
        image: "https://tse1-mm.cn.bing.net/th/id/OIP-C.b3Z3FQQwDL-pRRH9bsHC3QHaM9?w=156&h=191&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3",
        location: "石龙景区附近餐厅",
        price: 38,
      }
    ],
    notes: [
      {
        title: "最佳季节",
        content: "春秋两季气候宜人，是游览的最佳时间。夏季请注意防暑，冬季注意保暖。",
      },
      {
        title: "交通建议",
        content: "从贵港市区到平南县城有直达班车，从县城到景区有专线车。也可自驾前往，导航到平南石龙景区。",
      },
      {
        title: "票务信息",
        content: "景区门票90元/人，水上项目另收费。学生、老人、军人等有优惠。",
      },
      {
        title: "游览时间",
        content: "景区较大，建议预留一整天时间游览，避免匆忙。",
      },
    ],
    relatedSpots: [
      {
        id: 5,
        name: "石龙文化园",
        image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.wZs6V6WoOQatOcu5VIhj4gEyDL?w=283&h=188&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3",
        price: 30,
        rating: 4.3,
      },
      {
        id: 6,
        name: "平南古镇",
        image: "https://img0.baidu.com/it/u=694136025,1112566140&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=333",
        price: 0,
        rating: 4.5,
      }
    ],
    recommendedGuides: [
      {
        id: 1,
        title: "贵港三日游完美攻略",
        cover: "https://img0.baidu.com/it/u=1995709151,1000347016&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500",
        views: 12580,
        likes: 2360,
      },
      {
        id: 5,
        title: "贵港江滨公园休闲游",
        cover: "https://tse1-mm.cn.bing.net/th/id/OIP-C.gzcY3ba-nBu7JRa2108omQHaFF?w=240&h=180&c=7&r=0&o=7&cb=iwp2&pid=1.7&rm=3",
        views: 6520,
        likes: 1105,
      }
    ],
    comments: [
      {
        id: 1,
        user: {
          name: "石林爱好者",
          avatar: "https://picsum.photos/id/1015/200/200",
        },
        content: "石龙景区真的很壮观，石林的规模超乎想象！攻略很详细，对我的行程帮助很大。",
        time: "2024-04-20 10:30:00",
        replies: [
          {
            id: 1,
            user: {
              name: "旅游达人",
              avatar: "https://tse1-mm.cn.bing.net/th/id/OIP-C.KVXcgGvIjZ9LYzKuQeOdnwHaEP?w=293&h=180&c=7&r=0&o=5&pid=1.7",
            },
            content: "谢谢你的喜欢！石龙景区确实很震撼，希望你在那里度过了愉快的时光！",
            time: "2024-04-20 11:05:00",
          },
        ],
      },
      {
        id: 2,
        user: {
          name: "风景摄影师",
          avatar: "https://picsum.photos/id/1029/200/200",
        },
        content: "水上石林太美了，拍了很多照片。不过游船价格略贵，希望攻略里能更新最新价格。",
        time: "2024-04-22 16:15:00",
        replies: [],
      }
    ],
  }
];

// 获取攻略详情的函数
export const getGuideDetail = (id) => {
  // 将id转换为数字
  const numId = parseInt(id, 10);
  // 在模拟数据中查找对应id的攻略
  return guideDetailData.find(guide => guide.id === numId) || guideDetailData[0];
}; 